package com.woody.aggregate.infrastructure.msgsendrule.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 弹窗规则关联目标表
 * </p>
 *
 * @author author
 * @since 2025-03-20
 */
@Data
@Accessors(chain = true)
@TableName("msg_send_rule_target_ref")
public class MsgSendRuleTargetRef implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 自增主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 规则表主键id
     */
    private Integer ruleId;

    /**
     * 推送目标类型 1:店铺
     */
    private Integer targetType;

    /**
     * 目标业务id(门店id)
     */
    private Long bizId;

    @JsonFormat(
            timezone = "GMT+8",
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    private Date createTime;

    @TableField(
            fill = FieldFill.INSERT
    )
    private Long createUserId;

    @TableLogic(
            value = "0",
            delval = "now()"
    )
    @TableField(
            fill = FieldFill.INSERT
    )
    private Long del;

}
